package com.devframe.sysbase.model;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Set;

import com.devframe.sysbase.model.base.BaseTSysUser;




public class TSysUser extends BaseTSysUser{
	private static final long serialVersionUID = 1L;

	/*[CONSTRUCTOR MARKER BEGIN]*/
		public TSysUser() {
			super();
		}

		/**
		 * Constructor for primary key
		 */
		public TSysUser(java.lang.String userId) {
			super(userId);
		}

	/*[CONSTRUCTOR MARKER END]*/
		
    public List getRoleIds(){
        List roleIds = new ArrayList();
        Set roles = this.getRoles();
        if(roles!=null && !roles.isEmpty()){
            Iterator it = roles.iterator();
            while (it.hasNext()){
                TSysUserRole role = (TSysUserRole)it.next();
                roleIds.add(role.getRole().getRoleCode());
            }
        }
        return roleIds;
    }
}
